<div id="required_fields_message"><?php echo $this->lang->line('common_fields_required_message'); ?></div>
<ul id="error_message_box"></ul>
<?php
echo form_open('stores/save/'.$location_info->store_id,array('id'=>'location_form'));
?>
<fieldset id="item_basic_info">
	<legend>Store information</legend>

	<div class="field_row clearfix">
<?php echo form_label($this->lang->line('stores_name').':', 'store_name',array('class'=>'required wide')); ?>
	<div class='form_field'>
	<?php echo form_input(array(
		'name'=>'store_name',
		'id'=>'store_name',
		'value'=>$location_info->store_name)
	);?>
	</div>
	</div>

<?php
echo form_submit(array(
	'name'=>'submit',
	'id'=>'submit',
	'value'=>$this->lang->line('common_submit'),
	'class'=>'submit_button float_right')
);
?>
</fieldset>
<?php
echo form_close();
?>
<script type='text/javascript'>
$(document).ready(function()
	{
		$('#location_form').validate({
		submitHandler:function(form)
		{
			/*
			make sure the hidden field #item_number gets set
			to the visible scan_item_number value
			*/
			$('#store_id').val($('#scan_store_id').val());
			$(form).ajaxSubmit({
			success:function(response)
			{
				tb_remove();
				post_item_form_submit(response);
			},
			dataType:'json'
		});

		},
		errorLabelContainer: "#error_message_box",
 		wrapper: "li",
		rules:
		{
			store_name:"required"		
   		},
		messages:
		{
			store_name:"Store Name is a required field.",
		}
	});
});
</script>